import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
  	isAuthenticated:false,
  	authToken:null
  },
  getters: {
  	isLogin(state){
  		return state.isAuthenticated;
  	},
  	authtoken(state){
  		return state.authToken
  	}
  },
  mutations: {
  	loginSuccess(state){
  		state.isAuthenticated=true
  	},
  	loginOut(state){
  		state.isAuthenticated=false
  	},
  	loginFail(state){
  		isAuthenticated=false
  	}
  },
  actions: {
  },
  modules: {
  }
})
